using HKB.Common;
using System;
using System.CodeDom.Compiler;
using System.ComponentModel;
using System.ComponentModel.Design;
using System.Data;
using System.Data.Common;
using System.Data.SqlClient;
using System.Diagnostics;
namespace HKB.Data.Dal.S_DeliverTypeTableAdapters
{
	[GeneratedCode("System.Data.Design.TypedDataSetGenerator", "2.0.0.0"), DataObject(true), HelpKeyword("vs.data.TableAdapter"), Designer("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"), DesignerCategory("code"), ToolboxItem(true)]
	public class HLShop_DeliverTypeTableAdapter : Component
	{
		private SqlDataAdapter _adapter;
		private SqlConnection _connection;
		private SqlCommand[] _commandCollection;
		private bool _clearBeforeFill;
		[System.Diagnostics.DebuggerNonUserCode]
		private SqlDataAdapter Adapter
		{
			get
			{
				if (this._adapter == null)
				{
					this.InitAdapter();
				}
				return this._adapter;
			}
		}
		[System.Diagnostics.DebuggerNonUserCode]
		internal SqlConnection Connection
		{
			get
			{
				if (this._connection == null)
				{
					this.InitConnection();
				}
				return this._connection;
			}
			set
			{
				this._connection = value;
				if (this.Adapter.InsertCommand != null)
				{
					this.Adapter.InsertCommand.Connection = value;
				}
				if (this.Adapter.DeleteCommand != null)
				{
					this.Adapter.DeleteCommand.Connection = value;
				}
				if (this.Adapter.UpdateCommand != null)
				{
					this.Adapter.UpdateCommand.Connection = value;
				}
				for (int i = 0; i < this.CommandCollection.Length; i++)
				{
					if (this.CommandCollection[i] != null)
					{
						this.CommandCollection[i].Connection = value;
					}
				}
			}
		}
		[System.Diagnostics.DebuggerNonUserCode]
		protected SqlCommand[] CommandCollection
		{
			get
			{
				if (this._commandCollection == null)
				{
					this.InitCommandCollection();
				}
				return this._commandCollection;
			}
		}
		[System.Diagnostics.DebuggerNonUserCode]
		public bool ClearBeforeFill
		{
			get
			{
				return this._clearBeforeFill;
			}
			set
			{
				this._clearBeforeFill = value;
			}
		}
		[System.Diagnostics.DebuggerNonUserCode]
		public HLShop_DeliverTypeTableAdapter()
		{
			this.ClearBeforeFill = true;
		}
		[System.Diagnostics.DebuggerNonUserCode]
		private void InitAdapter()
		{
			this._adapter = new SqlDataAdapter();
			DataTableMapping dataTableMapping = new DataTableMapping();
			dataTableMapping.SourceTable = "Table";
			dataTableMapping.DataSetTable = "HLShop_DeliverType";
			dataTableMapping.ColumnMappings.Add("TypeID", "TypeID");
			dataTableMapping.ColumnMappings.Add("TypeName", "TypeName");
			dataTableMapping.ColumnMappings.Add("Intro", "Intro");
			dataTableMapping.ColumnMappings.Add("ChargeType", "ChargeType");
			dataTableMapping.ColumnMappings.Add("IsDefault", "IsDefault");
			dataTableMapping.ColumnMappings.Add("IsDisabled", "IsDisabled");
			dataTableMapping.ColumnMappings.Add("Charge", "Charge");
			dataTableMapping.ColumnMappings.Add("UserID", "UserID");
			dataTableMapping.ColumnMappings.Add("DeliverAraa", "DeliverAraa");
			this._adapter.TableMappings.Add(dataTableMapping);
			this._adapter.DeleteCommand = new SqlCommand();
			this._adapter.DeleteCommand.Connection = this.Connection;
			this._adapter.DeleteCommand.CommandText = "DELETE FROM [HLShop_DeliverType] WHERE (([TypeID] = @Original_TypeID))";
			this._adapter.DeleteCommand.CommandType = CommandType.Text;
			this._adapter.DeleteCommand.Parameters.Add(new SqlParameter("@Original_TypeID", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "TypeID", DataRowVersion.Original, false, null, "", "", ""));
			this._adapter.InsertCommand = new SqlCommand();
			this._adapter.InsertCommand.Connection = this.Connection;
			this._adapter.InsertCommand.CommandText = "INSERT INTO [HLShop_DeliverType] ([UserID], [TypeName], [Intro], [ChargeType], [IsDefault], [IsDisabled], [Charge], [DeliverAraa]) VALUES (@UserID, @TypeName, @Intro, @ChargeType, @IsDefault, @IsDisabled, @Charge, @DeliverAraa)";
			this._adapter.InsertCommand.CommandType = CommandType.Text;
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@UserID", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "UserID", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@TypeName", SqlDbType.NVarChar, 0, ParameterDirection.Input, 0, 0, "TypeName", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@Intro", SqlDbType.NText, 0, ParameterDirection.Input, 0, 0, "Intro", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@ChargeType", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "ChargeType", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@IsDefault", SqlDbType.Bit, 0, ParameterDirection.Input, 0, 0, "IsDefault", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@IsDisabled", SqlDbType.Bit, 0, ParameterDirection.Input, 0, 0, "IsDisabled", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@Charge", SqlDbType.Decimal, 0, ParameterDirection.Input, 18, 2, "Charge", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@DeliverAraa", SqlDbType.NText, 1600, ParameterDirection.Input, 0, 0, "DeliverAraa", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand = new SqlCommand();
			this._adapter.UpdateCommand.Connection = this.Connection;
			this._adapter.UpdateCommand.CommandText = "UPDATE [HLShop_DeliverType] SET [UserID] = @UserID, [TypeName] = @TypeName, [Intro] = @Intro, [ChargeType] = @ChargeType, [IsDefault] = @IsDefault, [IsDisabled] = @IsDisabled, [Charge] = @Charge, [DeliverAraa] = @DeliverAraa WHERE (([TypeID] = @Original_TypeID))";
			this._adapter.UpdateCommand.CommandType = CommandType.Text;
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@UserID", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "UserID", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@TypeName", SqlDbType.NVarChar, 0, ParameterDirection.Input, 0, 0, "TypeName", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@Intro", SqlDbType.NText, 0, ParameterDirection.Input, 0, 0, "Intro", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@ChargeType", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "ChargeType", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@IsDefault", SqlDbType.Bit, 0, ParameterDirection.Input, 0, 0, "IsDefault", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@IsDisabled", SqlDbType.Bit, 0, ParameterDirection.Input, 0, 0, "IsDisabled", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@Charge", SqlDbType.Decimal, 0, ParameterDirection.Input, 18, 2, "Charge", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@DeliverAraa", SqlDbType.NText, 1600, ParameterDirection.Input, 0, 0, "DeliverAraa", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@Original_TypeID", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "TypeID", DataRowVersion.Original, false, null, "", "", ""));
		}
		[System.Diagnostics.DebuggerNonUserCode]
		private void InitConnection()
		{
			this._connection = new SqlConnection();
			this._connection.ConnectionString = Conn.CurrenConnectionStrings;
		}
		[System.Diagnostics.DebuggerNonUserCode]
		private void InitCommandCollection()
		{
			this._commandCollection = new SqlCommand[11];
			this._commandCollection[0] = new SqlCommand();
			this._commandCollection[0].Connection = this.Connection;
			this._commandCollection[0].CommandText = "SELECT TypeID, UserID, TypeName, Intro, ChargeType, IsDefault, IsDisabled, Charge, \r\n      DeliverAraa\r\nFROM HLShop_DeliverType";
			this._commandCollection[0].CommandType = CommandType.Text;
			this._commandCollection[1] = new SqlCommand();
			this._commandCollection[1].Connection = this.Connection;
			this._commandCollection[1].CommandText = "SELECT COUNT(TypeID) FROM HLShop_DeliverType\r\nWHERE UserID=@UserID";
			this._commandCollection[1].CommandType = CommandType.Text;
			this._commandCollection[1].Parameters.Add(new SqlParameter("@UserID", SqlDbType.Int, 4, ParameterDirection.Input, 0, 0, "UserID", DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[2] = new SqlCommand();
			this._commandCollection[2].Connection = this.Connection;
			this._commandCollection[2].CommandText = "DELETE FROM [HLShop_DeliverType] WHERE (([TypeID] = @TypeID) AND ([UserID]=@UserID))";
			this._commandCollection[2].CommandType = CommandType.Text;
			this._commandCollection[2].Parameters.Add(new SqlParameter("@TypeID", SqlDbType.Int, 4, ParameterDirection.Input, 0, 0, "TypeID", DataRowVersion.Original, false, null, "", "", ""));
			this._commandCollection[2].Parameters.Add(new SqlParameter("@UserID", SqlDbType.Int, 4, ParameterDirection.Input, 0, 0, "UserID", DataRowVersion.Original, false, null, "", "", ""));
			this._commandCollection[3] = new SqlCommand();
			this._commandCollection[3].Connection = this.Connection;
			this._commandCollection[3].CommandText = "SELECT Charge, ChargeType, DeliverAraa, Intro, IsDefault, IsDisabled, TypeID, TypeName, UserID FROM HLShop_DeliverType WHERE (UserID = @UserID) AND (IsDisabled = 0)";
			this._commandCollection[3].CommandType = CommandType.Text;
			this._commandCollection[3].Parameters.Add(new SqlParameter("@UserID", SqlDbType.Int, 4, ParameterDirection.Input, 0, 0, "UserID", DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[4] = new SqlCommand();
			this._commandCollection[4].Connection = this.Connection;
			this._commandCollection[4].CommandText = "PR_GetDeliverTypeByTypeIDArrayUserIDNotDisable";
			this._commandCollection[4].CommandType = CommandType.StoredProcedure;
			this._commandCollection[4].Parameters.Add(new SqlParameter("@RETURN_VALUE", SqlDbType.Int, 4, ParameterDirection.ReturnValue, 10, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[4].Parameters.Add(new SqlParameter("@UserID", SqlDbType.Int, 4, ParameterDirection.Input, 10, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[4].Parameters.Add(new SqlParameter("@TypeIDArray", SqlDbType.VarChar, 100, ParameterDirection.Input, 0, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[5] = new SqlCommand();
			this._commandCollection[5].Connection = this.Connection;
			this._commandCollection[5].CommandText = "SELECT Charge, ChargeType, DeliverAraa, Intro, IsDefault, IsDisabled, TypeID, TypeName, UserID FROM HLShop_DeliverType WHERE (UserID = @UserID) AND (TypeID = @TypeID) AND (IsDisabled = 0)";
			this._commandCollection[5].CommandType = CommandType.Text;
			this._commandCollection[5].Parameters.Add(new SqlParameter("@UserID", SqlDbType.Int, 4, ParameterDirection.Input, 0, 0, "UserID", DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[5].Parameters.Add(new SqlParameter("@TypeID", SqlDbType.Int, 4, ParameterDirection.Input, 0, 0, "TypeID", DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[6] = new SqlCommand();
			this._commandCollection[6].Connection = this.Connection;
			this._commandCollection[6].CommandText = "Pr_GetDeliverTypeByUserIDTypeIDStatusDisabled";
			this._commandCollection[6].CommandType = CommandType.StoredProcedure;
			this._commandCollection[6].Parameters.Add(new SqlParameter("@RETURN_VALUE", SqlDbType.Int, 4, ParameterDirection.ReturnValue, 10, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[6].Parameters.Add(new SqlParameter("@TypeID", SqlDbType.Int, 4, ParameterDirection.Input, 10, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[6].Parameters.Add(new SqlParameter("@UserID", SqlDbType.Int, 4, ParameterDirection.Input, 10, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[6].Parameters.Add(new SqlParameter("@Status", SqlDbType.Int, 4, ParameterDirection.Input, 10, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[6].Parameters.Add(new SqlParameter("@IsDisabled", SqlDbType.Int, 4, ParameterDirection.Input, 10, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[7] = new SqlCommand();
			this._commandCollection[7].Connection = this.Connection;
			this._commandCollection[7].CommandText = "SELECT Charge, ChargeType, DeliverAraa, Intro, IsDefault, IsDisabled, TypeID, TypeName, UserID FROM HLShop_DeliverType WHERE (UserID = @UserID) AND (TypeName = @TypeName)";
			this._commandCollection[7].CommandType = CommandType.Text;
			this._commandCollection[7].Parameters.Add(new SqlParameter("@UserID", SqlDbType.Int, 4, ParameterDirection.Input, 0, 0, "UserID", DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[7].Parameters.Add(new SqlParameter("@TypeName", SqlDbType.NVarChar, 50, ParameterDirection.Input, 0, 0, "TypeName", DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[8] = new SqlCommand();
			this._commandCollection[8].Connection = this.Connection;
			this._commandCollection[8].CommandText = "INSERT INTO HLShop_DeliverType\r\n      (UserID, TypeName, Intro, ChargeType, IsDefault, IsDisabled, Charge, DeliverAraa)\r\nVALUES (@UserID,@TypeName,@Intro,@ChargeType,@IsDefault,@IsDisabled,@Charge,@DeliverAraa)";
			this._commandCollection[8].CommandType = CommandType.Text;
			this._commandCollection[8].Parameters.Add(new SqlParameter("@UserID", SqlDbType.Int, 4, ParameterDirection.Input, 0, 0, "UserID", DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[8].Parameters.Add(new SqlParameter("@TypeName", SqlDbType.NVarChar, 50, ParameterDirection.Input, 0, 0, "TypeName", DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[8].Parameters.Add(new SqlParameter("@Intro", SqlDbType.NText, 1073741823, ParameterDirection.Input, 0, 0, "Intro", DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[8].Parameters.Add(new SqlParameter("@ChargeType", SqlDbType.Int, 4, ParameterDirection.Input, 0, 0, "ChargeType", DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[8].Parameters.Add(new SqlParameter("@IsDefault", SqlDbType.Bit, 1, ParameterDirection.Input, 0, 0, "IsDefault", DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[8].Parameters.Add(new SqlParameter("@IsDisabled", SqlDbType.Bit, 1, ParameterDirection.Input, 0, 0, "IsDisabled", DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[8].Parameters.Add(new SqlParameter("@Charge", SqlDbType.Decimal, 9, ParameterDirection.Input, 18, 2, "Charge", DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[8].Parameters.Add(new SqlParameter("@DeliverAraa", SqlDbType.NText, 1600, ParameterDirection.Input, 0, 0, "DeliverAraa", DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[9] = new SqlCommand();
			this._commandCollection[9].Connection = this.Connection;
			this._commandCollection[9].CommandText = "pr_setDeliverTypeAsDefault";
			this._commandCollection[9].CommandType = CommandType.StoredProcedure;
			this._commandCollection[9].Parameters.Add(new SqlParameter("@RETURN_VALUE", SqlDbType.Int, 4, ParameterDirection.ReturnValue, 10, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[9].Parameters.Add(new SqlParameter("@TypeID", SqlDbType.Int, 4, ParameterDirection.Input, 10, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[10] = new SqlCommand();
			this._commandCollection[10].Connection = this.Connection;
			this._commandCollection[10].CommandText = "UPDATE HLShop_DeliverType\r\nSET IsDisabled = @IsDisabled, TypeName = @TypeName, Charge = @Charge, \r\n      Intro = @Intro, ChargeType = @ChargeType, DeliverAraa = @DeliverAraa\r\nWHERE (TypeID = @typeID)";
			this._commandCollection[10].CommandType = CommandType.Text;
			this._commandCollection[10].Parameters.Add(new SqlParameter("@IsDisabled", SqlDbType.Bit, 1, ParameterDirection.Input, 0, 0, "IsDisabled", DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[10].Parameters.Add(new SqlParameter("@TypeName", SqlDbType.NVarChar, 50, ParameterDirection.Input, 0, 0, "TypeName", DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[10].Parameters.Add(new SqlParameter("@Charge", SqlDbType.Decimal, 9, ParameterDirection.Input, 18, 2, "Charge", DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[10].Parameters.Add(new SqlParameter("@Intro", SqlDbType.NText, 1073741823, ParameterDirection.Input, 0, 0, "Intro", DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[10].Parameters.Add(new SqlParameter("@ChargeType", SqlDbType.Int, 4, ParameterDirection.Input, 0, 0, "ChargeType", DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[10].Parameters.Add(new SqlParameter("@DeliverAraa", SqlDbType.NText, 1600, ParameterDirection.Input, 0, 0, "DeliverAraa", DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[10].Parameters.Add(new SqlParameter("@typeID", SqlDbType.Int, 4, ParameterDirection.Input, 0, 0, "TypeID", DataRowVersion.Original, false, null, "", "", ""));
		}
		[DataObjectMethod(DataObjectMethodType.Select, true), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual S_DeliverType.HLShop_DeliverTypeDataTable GetAllDeliverType()
		{
			this.Adapter.SelectCommand = this.CommandCollection[0];
			S_DeliverType.HLShop_DeliverTypeDataTable hLShop_DeliverTypeDataTable = new S_DeliverType.HLShop_DeliverTypeDataTable();
			this.Adapter.Fill(hLShop_DeliverTypeDataTable);
			return hLShop_DeliverTypeDataTable;
		}
		[DataObjectMethod(DataObjectMethodType.Select, false), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual S_DeliverType.HLShop_DeliverTypeDataTable GetDeliverTypeByUserIDNotDisabled(int? UserID)
		{
			this.Adapter.SelectCommand = this.CommandCollection[3];
			if (UserID.HasValue)
			{
				this.Adapter.SelectCommand.Parameters[0].Value = UserID.Value;
			}
			else
			{
				this.Adapter.SelectCommand.Parameters[0].Value = System.DBNull.Value;
			}
			S_DeliverType.HLShop_DeliverTypeDataTable hLShop_DeliverTypeDataTable = new S_DeliverType.HLShop_DeliverTypeDataTable();
			this.Adapter.Fill(hLShop_DeliverTypeDataTable);
			return hLShop_DeliverTypeDataTable;
		}
		[DataObjectMethod(DataObjectMethodType.Select, false), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual S_DeliverType.HLShop_DeliverTypeDataTable GetDeliverTypeByUserIDTypeIDArrayNotDisabled(int? UserID, string TypeIDArray)
		{
			this.Adapter.SelectCommand = this.CommandCollection[4];
			if (UserID.HasValue)
			{
				this.Adapter.SelectCommand.Parameters[1].Value = UserID.Value;
			}
			else
			{
				this.Adapter.SelectCommand.Parameters[1].Value = System.DBNull.Value;
			}
			if (TypeIDArray == null)
			{
				this.Adapter.SelectCommand.Parameters[2].Value = System.DBNull.Value;
			}
			else
			{
				this.Adapter.SelectCommand.Parameters[2].Value = TypeIDArray;
			}
			S_DeliverType.HLShop_DeliverTypeDataTable hLShop_DeliverTypeDataTable = new S_DeliverType.HLShop_DeliverTypeDataTable();
			this.Adapter.Fill(hLShop_DeliverTypeDataTable);
			return hLShop_DeliverTypeDataTable;
		}
		[DataObjectMethod(DataObjectMethodType.Select, false), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual S_DeliverType.HLShop_DeliverTypeDataTable GetDeliverTypeByUserIDTypeIDNotDisable(int? UserID, int TypeID)
		{
			this.Adapter.SelectCommand = this.CommandCollection[5];
			if (UserID.HasValue)
			{
				this.Adapter.SelectCommand.Parameters[0].Value = UserID.Value;
			}
			else
			{
				this.Adapter.SelectCommand.Parameters[0].Value = System.DBNull.Value;
			}
			this.Adapter.SelectCommand.Parameters[1].Value = TypeID;
			S_DeliverType.HLShop_DeliverTypeDataTable hLShop_DeliverTypeDataTable = new S_DeliverType.HLShop_DeliverTypeDataTable();
			this.Adapter.Fill(hLShop_DeliverTypeDataTable);
			return hLShop_DeliverTypeDataTable;
		}
		[DataObjectMethod(DataObjectMethodType.Select, false), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual S_DeliverType.HLShop_DeliverTypeDataTable GetDeliverTypeByUserIDTypeIDStatusDisabled(int? TypeID, int? UserID, int? Status, int? IsDisabled)
		{
			this.Adapter.SelectCommand = this.CommandCollection[6];
			if (TypeID.HasValue)
			{
				this.Adapter.SelectCommand.Parameters[1].Value = TypeID.Value;
			}
			else
			{
				this.Adapter.SelectCommand.Parameters[1].Value = System.DBNull.Value;
			}
			if (UserID.HasValue)
			{
				this.Adapter.SelectCommand.Parameters[2].Value = UserID.Value;
			}
			else
			{
				this.Adapter.SelectCommand.Parameters[2].Value = System.DBNull.Value;
			}
			if (Status.HasValue)
			{
				this.Adapter.SelectCommand.Parameters[3].Value = Status.Value;
			}
			else
			{
				this.Adapter.SelectCommand.Parameters[3].Value = System.DBNull.Value;
			}
			if (IsDisabled.HasValue)
			{
				this.Adapter.SelectCommand.Parameters[4].Value = IsDisabled.Value;
			}
			else
			{
				this.Adapter.SelectCommand.Parameters[4].Value = System.DBNull.Value;
			}
			S_DeliverType.HLShop_DeliverTypeDataTable hLShop_DeliverTypeDataTable = new S_DeliverType.HLShop_DeliverTypeDataTable();
			this.Adapter.Fill(hLShop_DeliverTypeDataTable);
			return hLShop_DeliverTypeDataTable;
		}
		[DataObjectMethod(DataObjectMethodType.Select, false), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual S_DeliverType.HLShop_DeliverTypeDataTable GetGetDeliverTypeByUserIDTypeName(int? UserID, string TypeName)
		{
			this.Adapter.SelectCommand = this.CommandCollection[7];
			if (UserID.HasValue)
			{
				this.Adapter.SelectCommand.Parameters[0].Value = UserID.Value;
			}
			else
			{
				this.Adapter.SelectCommand.Parameters[0].Value = System.DBNull.Value;
			}
			if (TypeName == null)
			{
				this.Adapter.SelectCommand.Parameters[1].Value = System.DBNull.Value;
			}
			else
			{
				this.Adapter.SelectCommand.Parameters[1].Value = TypeName;
			}
			S_DeliverType.HLShop_DeliverTypeDataTable hLShop_DeliverTypeDataTable = new S_DeliverType.HLShop_DeliverTypeDataTable();
			this.Adapter.Fill(hLShop_DeliverTypeDataTable);
			return hLShop_DeliverTypeDataTable;
		}
		[DataObjectMethod(DataObjectMethodType.Select, false), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual S_DeliverType.HLShop_DeliverTypeDataTable SetDeliverTypeAsDefault(int? TypeID)
		{
			this.Adapter.SelectCommand = this.CommandCollection[9];
			if (TypeID.HasValue)
			{
				this.Adapter.SelectCommand.Parameters[1].Value = TypeID.Value;
			}
			else
			{
				this.Adapter.SelectCommand.Parameters[1].Value = System.DBNull.Value;
			}
			S_DeliverType.HLShop_DeliverTypeDataTable hLShop_DeliverTypeDataTable = new S_DeliverType.HLShop_DeliverTypeDataTable();
			this.Adapter.Fill(hLShop_DeliverTypeDataTable);
			return hLShop_DeliverTypeDataTable;
		}
		[HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual int Update(S_DeliverType.HLShop_DeliverTypeDataTable dataTable)
		{
			return this.Adapter.Update(dataTable);
		}
		[HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual int Update(S_DeliverType dataSet)
		{
			return this.Adapter.Update(dataSet, "HLShop_DeliverType");
		}
		[HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual int Update(DataRow dataRow)
		{
			return this.Adapter.Update(new DataRow[]
			{
				dataRow
			});
		}
		[HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual int Update(DataRow[] dataRows)
		{
			return this.Adapter.Update(dataRows);
		}
		[HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual object CountDeliverTypeBySalerID(int? UserID)
		{
			SqlCommand sqlCommand = this.CommandCollection[1];
			if (UserID.HasValue)
			{
				sqlCommand.Parameters[0].Value = UserID.Value;
			}
			else
			{
				sqlCommand.Parameters[0].Value = System.DBNull.Value;
			}
			ConnectionState state = sqlCommand.Connection.State;
			if ((sqlCommand.Connection.State & ConnectionState.Open) != ConnectionState.Open)
			{
				sqlCommand.Connection.Open();
			}
			object obj;
			try
			{
				obj = sqlCommand.ExecuteScalar();
			}
			finally
			{
				if (state == ConnectionState.Closed)
				{
					sqlCommand.Connection.Close();
				}
			}
			object result;
			if (obj == null || obj.GetType() == typeof(System.DBNull))
			{
				result = null;
			}
			else
			{
				result = obj;
			}
			return result;
		}
		[DataObjectMethod(DataObjectMethodType.Delete, false), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual int DeleteDeliverType(int TypeID, int? UserID)
		{
			SqlCommand sqlCommand = this.CommandCollection[2];
			sqlCommand.Parameters[0].Value = TypeID;
			if (UserID.HasValue)
			{
				sqlCommand.Parameters[1].Value = UserID.Value;
			}
			else
			{
				sqlCommand.Parameters[1].Value = System.DBNull.Value;
			}
			ConnectionState state = sqlCommand.Connection.State;
			if ((sqlCommand.Connection.State & ConnectionState.Open) != ConnectionState.Open)
			{
				sqlCommand.Connection.Open();
			}
			int result;
			try
			{
				result = sqlCommand.ExecuteNonQuery();
			}
			finally
			{
				if (state == ConnectionState.Closed)
				{
					sqlCommand.Connection.Close();
				}
			}
			return result;
		}
		[DataObjectMethod(DataObjectMethodType.Insert, false), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual int InsertDeliverType(int? UserID, string TypeName, string Intro, int? ChargeType, bool? IsDefault, bool? IsDisabled, decimal? Charge, string DeliverAraa)
		{
			SqlCommand sqlCommand = this.CommandCollection[8];
			if (UserID.HasValue)
			{
				sqlCommand.Parameters[0].Value = UserID.Value;
			}
			else
			{
				sqlCommand.Parameters[0].Value = System.DBNull.Value;
			}
			if (TypeName == null)
			{
				sqlCommand.Parameters[1].Value = System.DBNull.Value;
			}
			else
			{
				sqlCommand.Parameters[1].Value = TypeName;
			}
			if (Intro == null)
			{
				sqlCommand.Parameters[2].Value = System.DBNull.Value;
			}
			else
			{
				sqlCommand.Parameters[2].Value = Intro;
			}
			if (ChargeType.HasValue)
			{
				sqlCommand.Parameters[3].Value = ChargeType.Value;
			}
			else
			{
				sqlCommand.Parameters[3].Value = System.DBNull.Value;
			}
			if (IsDefault.HasValue)
			{
				sqlCommand.Parameters[4].Value = IsDefault.Value;
			}
			else
			{
				sqlCommand.Parameters[4].Value = System.DBNull.Value;
			}
			if (IsDisabled.HasValue)
			{
				sqlCommand.Parameters[5].Value = IsDisabled.Value;
			}
			else
			{
				sqlCommand.Parameters[5].Value = System.DBNull.Value;
			}
			if (Charge.HasValue)
			{
				sqlCommand.Parameters[6].Value = Charge.Value;
			}
			else
			{
				sqlCommand.Parameters[6].Value = System.DBNull.Value;
			}
			if (DeliverAraa == null)
			{
				sqlCommand.Parameters[7].Value = System.DBNull.Value;
			}
			else
			{
				sqlCommand.Parameters[7].Value = DeliverAraa;
			}
			ConnectionState state = sqlCommand.Connection.State;
			if ((sqlCommand.Connection.State & ConnectionState.Open) != ConnectionState.Open)
			{
				sqlCommand.Connection.Open();
			}
			int result;
			try
			{
				result = sqlCommand.ExecuteNonQuery();
			}
			finally
			{
				if (state == ConnectionState.Closed)
				{
					sqlCommand.Connection.Close();
				}
			}
			return result;
		}
		[DataObjectMethod(DataObjectMethodType.Update, false), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual int UpdateDeliverType(bool? IsDisabled, string TypeName, decimal? Charge, string Intro, int? ChargeType, string DeliverAraa, int typeID)
		{
			SqlCommand sqlCommand = this.CommandCollection[10];
			if (IsDisabled.HasValue)
			{
				sqlCommand.Parameters[0].Value = IsDisabled.Value;
			}
			else
			{
				sqlCommand.Parameters[0].Value = System.DBNull.Value;
			}
			if (TypeName == null)
			{
				sqlCommand.Parameters[1].Value = System.DBNull.Value;
			}
			else
			{
				sqlCommand.Parameters[1].Value = TypeName;
			}
			if (Charge.HasValue)
			{
				sqlCommand.Parameters[2].Value = Charge.Value;
			}
			else
			{
				sqlCommand.Parameters[2].Value = System.DBNull.Value;
			}
			if (Intro == null)
			{
				sqlCommand.Parameters[3].Value = System.DBNull.Value;
			}
			else
			{
				sqlCommand.Parameters[3].Value = Intro;
			}
			if (ChargeType.HasValue)
			{
				sqlCommand.Parameters[4].Value = ChargeType.Value;
			}
			else
			{
				sqlCommand.Parameters[4].Value = System.DBNull.Value;
			}
			if (DeliverAraa == null)
			{
				sqlCommand.Parameters[5].Value = System.DBNull.Value;
			}
			else
			{
				sqlCommand.Parameters[5].Value = DeliverAraa;
			}
			sqlCommand.Parameters[6].Value = typeID;
			ConnectionState state = sqlCommand.Connection.State;
			if ((sqlCommand.Connection.State & ConnectionState.Open) != ConnectionState.Open)
			{
				sqlCommand.Connection.Open();
			}
			int result;
			try
			{
				result = sqlCommand.ExecuteNonQuery();
			}
			finally
			{
				if (state == ConnectionState.Closed)
				{
					sqlCommand.Connection.Close();
				}
			}
			return result;
		}
	}
}
